<!DOCTYPE html>
<html>
<meta charset="utf-8">
 <title>项目概况</title>
 <#include "/header.html">
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight" id="rrapp">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox-content">
		   <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">启动次数</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="statisStart.startTimes" placeholder="启动次数"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">统计结果类型，该字段表明该条结果是时统计，天统计，周统计，月统计，年统计等</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="statisStart.timeType" placeholder="统计结果类型，该字段表明该条结果是时统计，天统计，周统计，月统计，年统计等"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">统计结果日期</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="statisStart.time" placeholder="统计结果日期"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">产品id</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="statisStart.appId" placeholder="产品id"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">产品版本号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="statisStart.appVersion" placeholder="产品版本号"/>
                        </div>
                    </div>
							           	<div class="form-group">
				<div class="col-sm-3 control-label"></div>
				<input type="button" class="btn btn-primary"  @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning"    onclick="closeContent();" value="返回"/>
			</div>
        </form>
			
			
	 
				</div>
				
			</div>
		</div>
		
	</div>
 	<script>
	 
  function closeContent(){
 	 
 		var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
 	}  
  
    $(document)
	.ready(
			function() {
				vm.getInfo();	
			});  
  
 
 var vm = new Vue({
	el:'#rrapp',
	data:{
		showList: true,
		title: null,
		statisStart: {
		id:T.p("id"),
		}
	},
	methods: {
		query: function () {
			vm.reload();
		} ,
		saveOrUpdate: function (event) {
			var url = vm.statisStart.id == null ? "wiztalk/statisstart/save" : "wiztalk/statisstart/update";
			$.ajax({
				type: "POST",
			    url: baseURL + url,
                contentType: "application/json",
			    data: JSON.stringify(vm.statisStart),
			    success: function(r){
			    	if(r.code === 0){
						alert('操作成功', function(index){
						parent.vm.reload();
				var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
				parent.layer.close(index);
						});
					}else{
						alert(r.msg);
					}
				}
			});
		} ,
		getInfo: function(){
		 if(!T.p("id")){
				 return;
			 }
			$.get(baseURL + "wiztalk/statisstart/info/"+T.p("id"), function(r){
                vm.statisStart = r.statisStart;
            });
		} 
	}
});
	</script>
	
	
</body>
</html>
